First we'll make a plot of the maximum diffusion distance so that you can learn how to make plots. Then you will make a plot on your own to match the reference pattern.
Right now, there is no way to create plots directly in NetLogo Web, so you'll have to use NetLogo Desktop.
For one dimensional diffusion, there is a known linear relationship between the squared diffusion distance and time. We'll make a plot of the squared maximum diffusion distance over time, and it should show an approximately linear relationship.
To create a plot, right-click on the white area and select plot. You can also click the add button on the top of the interface with the selector next to it set to "plot." Enter this code in the Pen update command box: plot (max([pxcor] of a-atoms) - min([pxcor] of b-atoms)) ^ 2. And change the title to Max Diffusion Distance.
Your final plot box should look like this:
Here is what's going on in the plot command:
- plot: plots the new point (full documentation)
- [pxcor] of a-atoms: returns a list of the pxcor of the patch that each a-atom is on
- max(list) and min(list): return the maximum and minimum value of a list respectively
- number ^ 2: squares the number. ^ is really "to the power" so if you changed the 2 to a 3, it would cube the number.
Run the model with the new graph. Is the relationship approximately linear? Why isn't it exactly linear?